// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;

namespace SnapObjects.Data
{
    /// <summary>
    ///     Denotes that a model class should use a search condition for a group or an aggregate.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
    public class SqlHavingAttribute : SqlWhereAttribute
    {
        /// <summary>
        ///     Initializes a new instance of the SqlHavingAttribute class.
        /// </summary>
        /// <param name="rawCondition">A raw SQL search condition in the HAVING clause after the keyword HAVING.</param>
        public SqlHavingAttribute(string rawCondition)
            : base(rawCondition)
        {
        }

        /*public SqlHavingAttribute(string left, object rightAsValue)
            : base(left, rightAsValue)
        {
        }*/

        /// <summary>
        ///     Initializes a new instance of the SqlHavingAttribute class.
        /// </summary>
        /// <param name="left">
        ///     The raw SQL expression on the left of the operator.
        ///     If the Operator property is not specified, the operator defaults to "=".
        /// </param>
        /// <param name="right">The raw SQL expression on the right of the operator.</param>
        public SqlHavingAttribute(string left, string right)
            : base(left, right)
        {
        }
    }
}
